home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98b.txt
/
000060_icon-group-sender _Wed Jun 3 08:17:24 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id IAA00835
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 3 Jun 1998 08:17:23 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA07445; Wed, 3 Jun 1998 08:17:16 -0700
From: "Nevin :-] Liber" <nevin@pendragon-software.com>
To: <icon-group@optima.CS.Arizona.EDU>
Subject: Re: Directory access facilities
Date: Tue, 2 Jun 1998 21:00:33 -0500
Message-Id: <01bd8e93$64a4caa0$c37546cf@NEVIN>
Mime-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 1478
From: Gregg Townsend <gmt@baskerville.CS.Arizona.EDU>
To: icon-group@baskerville.CS.Arizona.EDU
<icon-group@baskerville.CS.Arizona.EDU>
Date: Tuesday, June 02, 1998 2:26 PM
Subject: Re: Directory access facilities
>I'd prefer a simple built-in function that would generate the names
>of the files contained in a directory, e.g.
> contents(s)
>with other mechanisms (if any) used for finding attributes.
I agree with you here, Gregg. Probably need to, as a minimum, add a second
function to determine if a given string refers to a directory name.
Something like:
dir(sDirectory) - generator that returns filenames in directory
string(sDirectory), one name at a time. No guarantee to the order in which
directory entries are returned.
isdir(sDirectory) - returns sDirectory if string(sDirectory) refers to a
directory; otherwise fails
One might be tempted to use initial failure from dirname() to determine if a
given directory is empty; however, this doesn't work in general, as on some
systems it might not be possible to differentiate between a non-existant
directory and an empty directory.
I would also vote against filtering out "." and ".."; dir() should return an
accurate representation of what is in the directory, and not require any
special casing (and it is trivial to filter this out at a higher level).
__
Nevin ":-)" Liber <mailto:nevin@pendragon-software.com> (847) 816-9926
Senior Software Engineer, Pendragon Software <http://www.webfayre.com/>